package com.jinhongone.pattern.behavior.observer;

/**
 * @author jinho
 * @className WeiXinUser
 * @description 具体观察者角色
 * @date 2025/4/16 15:53
 */
public class WeiXinUser implements Observer {

    private String name;

    public WeiXinUser(String name) {
        this.name = name;
    }

    //主题变更时更新自身具体实现
    @Override
    public void update(String msg) {
        System.out.println("微信用户：" + name + ",接收到订阅主题更新消息：" + msg);
    }
}
